package net.lb.socketserver.util;

import java.nio.ByteBuffer;

public interface HeadFactory
{
    /**
     * 根据一定的算法填充报文协议头，放入buffer中。只填充协议头的4个字节
     * 
     * @param buffer
     * @param command
     * @param result
     * @param length
     */
    public void putHeadInBuffer(ByteBuffer buffer, byte command, int length);
    
    /**
     * 判断从position开始的10个字节是否符合报文头协议
     * 
     * @param buffer
     * @param position
     * @return
     */
    public boolean fitHeadPtotocol(ByteBuffer buffer, int position);
}
